package cn.jiyun.service.impl;

import cn.jiyun.entity.XmSensitiveness;
import cn.jiyun.mapper.XmSensitivenessMapper;
import cn.jiyun.service.IXmSensitivenessService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-11-21
 */
@Service
public class XmSensitivenessServiceImpl extends ServiceImpl<XmSensitivenessMapper, XmSensitiveness> implements IXmSensitivenessService {

    @Override
    public Page findPage(Integer pageNum, Integer pageSize, XmSensitiveness xms) {
        Page<XmSensitiveness> xmSensitivenessPage = new Page<>(pageNum, pageSize);
        LambdaQueryWrapper<XmSensitiveness> qr = new LambdaQueryWrapper<XmSensitiveness>();
        qr.like(xms.getRadius()!=null,XmSensitiveness::getRadius,xms.getRadius());
        return baseMapper.selectPage(xmSensitivenessPage, qr);
    }
}
